
import request from "../../common/request";

// 关联公户查看
export function publicAcc(data) {
    return request.request({
      url: `/farm/show-bank`,
      method: "post",
      data: data,
    });
}
//保存修改关联公户
export function saveAcc(data) {
    return request.request({
      url: `/farm/relevance-bank`,
      method: "post",
      data: data,
    });
}
// 新增预约 /farm/addOrder
export function farmAddorder(data) {
    return request.request({
      url: `/farm/addOrder`,
      method: "post",
      data: data,
    });
}
// 获取养殖户车辆 /farm/getFarmCar
export function farmgetCar(data) {
    return request.request({
      url: `/farm/getFarmCar`,
      method: "post",
      data: data,
    });
}
// 编辑养殖户车辆 /farm/updateFarmCar
export function editFarmCar(data) {
  return request.request({
    url: `/farm/updateFarmCar`,
    method: "post",
    data: data,
  });
}
//新增养殖户车辆
export function addFarmCar(data) {
  return request.request({
    url: `/farm/addFarmCar`,
    method: "post",
    data: data,
  });
}
// 获取养殖户信息
export function getInfo(data) {
  return request.request({
    url: `/farm/getFarmMessage`,
    method: "post",
    data: data,
  });
}
// 有机质 
export function constantList(data) {
  return request.request({
    url: `/constant/getAllConstant`,
    method: "post",
    data: data,
  });
}
export function detail(data) {
  return request.request({
    url: `/constant/getSpecificConstant?id=${data.id}`,
    method: 'post',
    data:data,
  })
}
// 养殖户信息修改 
export function updateFarm(data) {
  return request.request({
    url: `/farm/updateFarm`,
    method: 'post',
    data:data,
  })
}
// 获取签约
export function getSign(data) {
  return request.request({
    //0待签约1已签约
    url: `/farm/getSign?contractState=${data}`,
    method: 'post',
    data:data,
  })
}
// 签约内容

export function getSignContent(data) {
  return request.request({
    url: `/farm/getSignContent?id=${data}`,
    method: 'post',
    data:data,
  })
}
// 司机列表 /driver/list
export function driverList(data) {
  return request.request({
    url: `/farm/list`,
    method: 'post',
    data:data,
  })
}
// 司机添加 http://127.0.0.1:20001
export function driverAdd(data) {
  return request.request({
    url: `/farm/add`,
    method: 'post',
    data:data,
  })
}
// 编辑司机 updateFarmDriver
export function driverEdit(data) {
  return request.request({
    url: `/farm/updateFarmDriver`,
    method: 'post',
    data:data,
  })
}
// /constant/getAllConstant
//有机质类型
export function allType(data) {
  return request.request({
    url: `/constant/getAllConstant`,
    method: 'post',
    data:data,
  })
}
// 地磅 /work-order/finishWorkOrder
export function addWagons(data) {
  return request.request({
    url: `/work-order/finishWorkOrder`,
    method: 'post',
    data:data,
  })
}
// 签约合同
export function addSign(data) {
  return request.request({
    url: `/farm/farmSignContract`,
    method: 'post',
    data,
  })
}
///接受签约 acceptSignContract
export function acceptSign(data) {
  return request.request({
    url: `/farm/acceptSignContract?id=${data.id}&file=${data.filePath}`,
    method: 'post',
    // ,
  })
}
///farm/farmAcceptSignContract
export function acceptSigns(data) {
  return request.request({
    url: `/farm/farmAcceptSignContract?file=${data.filePath}`,
    method: 'post',
    // ,
  })
}
// export function acceptSign(data) {
//   return request.request({
//     url: `/farm/acceptSignContract`,
//     method: 'post',
//     data,
//   })
// }
//模拟地磅 /work-order/outWeighBridge
export function outWeighBridge(data) {
  return request.request({
    url: `/work-order/outWeighBridge`,
    method: 'post',
    data,
  })
}
//关联公户 /treatment-plant/showMessage
export function showMessage(data) {
  return request.request({
    url: `/treatment-plant/showMessage`,
    method: 'post',
    data,
  })
}
//待缴费列表 http://127.0.0.1:20001/farm/pay-list
export function farmPaylist(data) {
  return request.request({
    url: `/farm/pay-list`,
    method: 'post',
    data,
  })
}
//generatePDF
export function generatePDF(data) {
  return request.request({
    url: `/farm/generatePDF`,
    method: 'post',
    data,
  })
}
//删除签约 /farm/delContract?id=
export function delCon(data) {
  return request.request({
    url: `/farm/delContract?id=${data}`,
    method: 'post',
    data,
  })
}